﻿using System.Xml.Linq;

namespace NJabber.Stream.Elements
{
    public class StanzaTestBase : DatagramElementTestBase
    {
        public StanzaTestBase(string name, string namespaceUri, string namespaceName) : base(name, namespaceUri, namespaceName)
        { }

        public XElement CreateStanzaXElement(string name, string type)
        {
            XElement stanza = CreateXElement(name);
            if(!string.IsNullOrEmpty(type))stanza.SetAttributeValue("type", type);
            return stanza;
        }
    }
}
